import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';

import { CombodyPage } from "../combody/combody";
import { MenusPage} from "../menus/menus";

@IonicPage()
@Component({
  selector: 'page-components',
  templateUrl: 'components.html',
})
export class ComponentsPage {

    public items:any;

    constructor(public navCtrl: NavController, public navParams: NavParams) {
        this.items = [
            {"id":'actionsheet',"name":'操作栏'},
            {"id":'alert',"name":'弹出框'},
            {"id":'badge',"name":'数字角标'},
            {"id":'button',"name":'按钮'},
            {"id":'card',"name":'卡片'},
            {"id":'checkbox',"name":'复选框'},
            {"id":'datetime',"name":'日期时间'},
            {"id":'fabs',"name":'菜单栏'},
            {"id":'grid',"name":'栅栏'},
            {"id":'icon',"name":'图标'},
            {"id":'input',"name":'输入框'},
            {"id":'list',"name":'列表'},
            {"id":'loading',"name":'加载框'},
            {"id":'menus',"name":'菜单'},
            {"id":'popover',"name":'弹出菜单'},
            {"id":'slider',"name":'图片轮播'},
        ];
    }

    ionViewDidLoad() {
        console.log('ionViewDidLoad ComponentsPage');
    }

    goPush(id,name){
        if(id == 'menus'){
            this.navCtrl.push(MenusPage,{
                id:id,
                name:name
            })
        }else{
            this.navCtrl.push(CombodyPage,{
                id:id,
                name:name
            })
        }

    }
}
